<template>
	<view class="bg-gradual-blue flcc pos-r padb30" style="height: 100vh;overflow: hidden;">
		<cu-custom bgColor="" class="w100">
			<!-- <block slot="content">创建订单</block> -->
			<block slot="backText"></block>
		</cu-custom>
		<view class="pos-a wh50-50 bca002 round b-9 r-9"> &nbsp; </view>
		<view class="pos-a wh80-80 bcaf1 round b-9 l-9 op5"> &nbsp; </view>
		<view class="pos-a wh30-30 bca002 round t-9 l-5"> &nbsp; </view>
		<view class="pos-a wh50-50 bcaf1 round t-9 r-9 "> &nbsp; </view>
		<view class="pos-a wh70-70 bca003 round t-9 l-9 mart30 marl50 op7"> &nbsp; </view>
		<!-- <view class="wh30-30 round flcc bdso bdcf">LOGO</view> -->
		<view class="bcf pad5 w100 flcc">
			<image src="../../../static/zyblogo.jpg" mode="widthFix" style="width: 30vw;"></image>
		</view>
		<view class="w80 c11 mart10 lh2">
			<view class="list-style-2 fs14 fwb cf marb10">流程管理系统V1.0</view>
			<my-text v-model="phone" label="账号 : " placeholder="请输入手机号" class="round"></my-text>
			<my-text-password v-model="password" label="密码 : " placeholder="系统密码" class="round mart10"></my-text-password>
			<view class="cu-btn lg w100 round mart30 bg-olive bdso bdcf ripple" @click="submit"> 登录 </view>
			<!-- <view>{{phone}}</view> -->
			<!-- <view>{{password}}</view> -->
		</view>
	</view>
</template>

<script>
	import myText from '../../../com/component/myText.vue'
	import myTextPassword from '../../../com/component/myTextPassword.vue'
	export default {
		components: {
			myText,myTextPassword
		},
		data() {
			return {
				phone: '15265461237',
				password: '123123'
			}
		},
		methods: {
			submit() {
				this.$api.post(
					'/app/login_password_code', {
						phone: this.phone,
						password: this.password
					},
					(res) => {
						console.log(res)
						if(res.s == 1){
							this.$com.setLocData('user_id',res.d.id)
							this.$com.setLocData('auth_token',res.d.apiToken)
							setTimeout(()=>{
								this.$win.gointo('/pages/stream/index/index')
							},500)
						}
						this.$com.showToast(res.i)
					})
			}
		}
	}
</script>

<style>

</style>
